package fabricadao;

import logueo.interfaces.LogueoDAO;
import examenes.interfaces.DetalleOrdenExamenDAO;
import examenes.interfaces.ExamenDAO;
import examenes.interfaces.OrdenExamenDAO;
import examenes.interfaces.TipoExamenDAO;
import atencion_de_emergencia.interfaces.AnimalMordedorDAO;
import atencion_de_emergencia.interfaces.OaeDAO;
import atencion_de_emergencia.interfaces.RoaeDAO;
import historia_clinica.interfaces.DepartamentoDAO;
import historia_clinica.interfaces.DistritoDAO;
import historia_clinica.interfaces.HistoriaClinicaDAO;
import historia_clinica.interfaces.ProvinciaDAO;
import historia_clinica.interfaces.TipoDocumentoDAO;

public abstract class DAOFactory {
    
	public static final int MYSQL = 1;
    public static final int ORACLE = 2;
    public static final int DB2 = 3;
    public static final int SQLSERVER = 4;
    public static final int XML = 5;
    
    //---------Atencion de Emergencia---------
    public abstract OaeDAO getOaeDAO();
    public abstract RoaeDAO getRoaeDAO();
    public abstract AnimalMordedorDAO getAnimalMordedorDAO();
    //-----------Historia Clinica------------
    public abstract HistoriaClinicaDAO getHistoriaClinicaDAO();
    public abstract DepartamentoDAO getDepartamentoDAO();
    public abstract ProvinciaDAO getProvinciaDAO();
    public abstract DistritoDAO getDistritoDAO();
    public abstract TipoDocumentoDAO getTipoDocumentoDAO();
    //---------------Examenes---------------
    public abstract OrdenExamenDAO getOrdenExamenDAO();
    public abstract ExamenDAO getExamenDAO();
    public abstract TipoExamenDAO getTipoExamenDAO();
    public abstract DetalleOrdenExamenDAO getDetallerOrdenExamenDAO();
    //--------------logueo
    public abstract LogueoDAO getLogueoDAO();
    
    public static DAOFactory getDAOFactory(int whichFactory){
       switch(whichFactory){
      	case MYSQL:
       	    return new MySqlDAOFactory();       	    
       	case XML:
       	    return new XMLDAOFactory();
       	case ORACLE:
       	    return new OracleDAOFactory();
       	case SQLSERVER:
       	    return new SqlServerDAOFactory();
       	default:
       	    return null;
       }
    }
	
	    
}
